<template>
	<view class="stats">
		<view class="stats-wrapper">
			<view class="stats-item">
				<view class="stats-text"><text class="linepice"></text><text>订单统计</text>
				</view>
				<view class="stats-body">
					<view class="stats-num">
						<view style="color: #101010;font-size: 23px;font-weight: bold;">{{rankInfo.ordercount || 0}}</view>
						<view style="color: #3B4065;font-size: 14px;">接单总量（单）</view>
					</view>
					<view class="stats-num">
						<view style="color: #101010;font-size: 23px;font-weight: bold;">{{rankInfo.todayorder || 0}}</view>
						<view style="color: #3B4065;font-size: 14px;">今日接单</view>
					</view>
					<view class="stats-num">
						<view style="color: #101010;font-size: 23px;font-weight: bold;">{{rankInfo.orderrank || 0}}</view>
						<view style="color: #3B4065;font-size: 14px;">接单排名</view>
					</view>
				</view>
			</view>
			<view class="stats-item">
				<view class="stats-text"><text class="linepice"></text><text>费用统计</text>
				</view>
				<view class="stats-body">
					<view class="stats-num">
						<view style="color: #101010;font-size: 23px;font-weight: bold;">{{rankInfo.ordertotal || 0}}</view>
						<view style="color: #3B4065;font-size: 14px;">接单总量（单）</view>
					</view>
					<view class="stats-num">
						<view style="color: #101010;font-size: 23px;font-weight: bold;">{{rankInfo.todaytotal || 0}}</view>
						<view style="color: #3B4065;font-size: 14px;">今日接单费用</view>
					</view>
					<view class="stats-num">
						<view style="color: #101010;font-size: 23px;font-weight: bold;">{{rankInfo.totalrank || 0}}</view>
						<view style="color: #3B4065;font-size: 14px;">接单费用排名</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				rankInfo:{}
			}
		},
		onShow(){
			this.getRank()
		},
		methods: {
			getRank(){
				this.$http.rank().then(res => {
					console.log(res)
					this.rankInfo = res.data
				})
			},
		}
	}
</script>

<style scoped>
	.linepice{
		width: 24upx;height: 8upx;background: #2B2A29;border-radius: 8upx;display: block;margin-right: 5px;
	}
	.stats{
		margin:  15px;
	}
.stats-text{
	font-size: 17px;
	font-weight: bold;
	display: flex;
	flex-direction: row;
	align-items: center;
}
.stats-num{
	display: flex;
	flex-direction: column;
	align-items: center;
}
.stats-body{
	width:690upx;
	height:260upx;
	background:rgba(248,248,248,1);
	border-radius:20upx;
	display: flex;
	flex-direction: row;
	    justify-content: space-around;
	align-items: center;
	margin: 16px 0;
	
}
</style>
